package com.example.school.controller;


import com.example.school.pojo.Course;
import com.example.school.service.ICourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xa
 * @since 2022-11-29
 */
@RestController
@RequestMapping("/course")
public class CourseController {
    private ICourseService iCourseService;
    @Autowired
    private void setiCourseService(ICourseService iCourseService){
        this.iCourseService = iCourseService;
    }

    @GetMapping("/aa")
    public List<Course> aa(){
        return iCourseService.list();
    }
}
